The present invention relates to computer graphics, and more particularly to constructing primitives for rendering purposes in a computer graphics pipeline.
In computer graphic systems, rendering and displaying three-dimensional graphics typically involves many calculations and computations. For example, to render a three dimensional object, a set of coordinate points or vertices that define a surface to be rendered must be formed. Vertices can be joined to form polygons, or primitives, that approximate the surface of the object to be rendered and displayed.
Tessellation refers to the process of decomposing the surface into simpler primitives such as triangles or quadrilaterals. Prior Art FIG. 1 illustrates the results of one example of a representative conventional tessellation process on a surface 100. First, a plurality of parallel, equally spaced curves 102 are defined which span a width of the surface 100 and coincide with a plurality of vertices 104. Thereafter, the vertices 104 are connected in a sequential order between each of the curves 102 from one side of the surface to an opposite side. Resulting is a mesh, or group, of a plurality of equally sized primitives, i.e. triangles, that are ready to be rendered.
While few problems arise when rendering and viewing these meshes individually, complications arise when adjacent meshes are rendered. These difficulties arise from the fact that the surface being rendered often are very dynamic, and the meshes utilize a very symmetric, rigidly structured tessellation pattern. For example, when attempting to tessellate a surface that fades off in the -Z direction, the number of vertices along the edges of adjacent meshes may be different and thus not be aligned, leaving cracks or gaps therebetween.
It should be noted that a separate problem arises when rendering individual meshes where no cracking can occur. This problem occurs when the tessellation must be varied from frame to frame to compensate for changing viewing conditions, i.e. the image of the surface in screen space is becoming larger or smaller, and the appropriate number of triangles is changing. Standard conventional schemes must introduce triangles in integer quanta.
The visual ramification of the aforementioned cracks is commonly referred to as xe2x80x9ccracking.xe2x80x9d In order to remove the cracks between different meshes which are joined together, graphic systems require costly computationally intensive techniques. Thus, the prior art graphic systems are traditionally inefficient for rendering two-dimensional representations from three-dimensional surfaces. Further, typical prior art implementations avoid cracking by stitching up the boundary between meshes. These solutions experience unwanted xe2x80x9cpoppingxe2x80x9d when the tessellations are varied.
There is thus a need for a tessellation process that avoids problems such as popping and cracking, and the computationally intensive techniques required to solve such problems.
A system, method and article of manufacture are provided for decomposing surfaces for rendering purposes during computer graphics processing. Initially, an interior mesh of primitives is defined in a surface to be rendered. Next, a plurality of surrounding meshes is defined along sides of the interior mesh.
The exterior sides of the surrounding meshes each include a plurality of equally sized segments and at least one fractional segment that is a fraction of the equally sized segments. With this configuration, a pattern of triangles is used that permits the number of triangles to be varied continuously from frame to frame while accommodating incremental evaluation techniques such as forward differencing without visual artifacts such as popping.
In one embodiment of the present invention, the interior mesh may include a predetermined number of rows and columns. Further, the interior sides of the surrounding meshes may each include a number of segments equal to the corresponding predetermined number of rows or columns of the interior mesh. Further, the exterior sides of the surrounding meshes may each have a number of segments equal to, greater than, or less than the corresponding predetermined number of rows or columns of the interior mesh.
In one aspect of the present invention, the interior mesh and the surrounding meshes may define one of a plurality of equally sized and shaped portions of the surface. Also, the fractional segments of each of the portions may be positioned adjacent a midpoint of a side of the surface. As an option, a width of the surrounding meshes may be equal to a width of the rows or columns of the interior mesh.
In another embodiment of the present invention, the interior mesh may include a transition mesh situated along sides of the interior mesh. Optionally, such transition mesh may have dimensions which are unequal to dimensions of the interior mesh. Further, the exterior sides of the surrounding meshes may each include a pair of fractional segments that are a fraction of the equally sized segments, and may be positioned at ends of the exterior sides of the surrounding meshes.